class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :login, :string, :null => false
      t.column :crypted_password, :string, :limit => 40
      t.column :display, :string
      t.column :email, :string
      t.column :salt, :string, :limit => 40
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
      t.column :remember_token, :string
      t.column :remember_token_expires_at, :datetime
    end
    
    add_index :users, [:login], :unique => true
    add_index :users, [:email], :unique => true
    add_index :users, [:display], :unique => true
  end

  def self.down
    drop_table :users
  end
end
